package com.springboot.cloud.demos.feign.service;

import com.springboot.cloud.common.core.entity.vo.Result;
import com.springboot.cloud.demos.entity.form.AddressInfoForm;
import com.springboot.cloud.demos.entity.form.AddressInfoForm;
import com.springboot.cloud.demos.entity.param.AddressInfoQueryParam;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient(name = "ribbon-consumer", fallback = AddressInfoServiceFallback.class)
public interface AddressInfoService {

    @RequestMapping(value = "/addressInfo/conditions", method = RequestMethod.POST)
    Result conditions(AddressInfoQueryParam params);

    @RequestMapping(value = "/addressInfo/{id}", method = RequestMethod.GET)
    Result addressInfo(@PathVariable(value = "id") String id);

    @RequestMapping(value = "/addressInfo", method = RequestMethod.POST)
    Result add(@RequestBody AddressInfoForm addressInfoForm);

    @RequestMapping(value = "/addressInfo", method = RequestMethod.PUT)
    Result update(@RequestBody AddressInfoForm addressInfoForm);

    @RequestMapping(value = "/addressInfo/{id}", method = RequestMethod.DELETE)
    void delete(@PathVariable(value = "id") String id);

}
